
package com.seekting.gongzhu.sdk;

import java.util.HashMap;

import com.seekting.gongzhu.sdk.Info.ErrorCode;

public class CodeDecoder {

    public static HashMap<Integer, String> hashmap;

    public synchronized static String getMsg(int code) {
        if (hashmap == null) {

            init();
        }
        return hashmap.get(code);
    }

    public static synchronized void init() {
        hashmap = new HashMap<Integer, String>();
        hashmap.put(ErrorCode.NO_GAME_JOIN, "没有可参加的游戏");
        hashmap.put(ErrorCode.NO_EMPTY_POSITION, "没有空位置");
    }
}
